<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<meta name="GENERATOR" content="PasDoc 0.11.0">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Crispy Plotter Documentation: WSVUtils</title>
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#FF0000">
<h1 class="unit">Unit WSVUtils</h1>
<table class="sections wide_list">
<tr>
<td><a class="section"  href="#%40Description">Description</a></td><td>uses</td><td><a class="section"  href="#%40Classes">Classes, Interfaces, Objects and Records</a></td><td><a class="section"  href="#%40FuncsProcs">Functions and Procedures</a></td><td><a class="section"  href="#%40Types">Types</a></td><td><a class="section"  href="#%40Constants">Constants</a></td><td>Variables</td></tr></table>
<a name="%40Description"></a><h2 class="description">Description</h2>
<p>
WSVUtils implements various helper routines and simple data types.</p>
<a name="%40Uses"></a><h2 class="overview">Overview</h2>
<a name="%40Classes"></a><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
<table class="classestable wide_list">
<tr class="listheader">
<th class="itemname">Name</th>
<th class="itemdesc">Description</th>
</tr>
<tr class="list">
<td class="itemname">Class&nbsp;<a class="bold"  href="WSVUtils.EUnsyncedWorkspaceError.html"><code>EUnsyncedWorkspaceError</code></a></td>
<td class="itemdesc">This exception is raised, raised, when the user attempts to open/modify a folder/function in the workspace, which does not exist in the file system anymore.</td>
</tr>
</table>
<a name="%40FuncsProcs"></a><h3 class="summary">Functions and Procedures</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code>function <b><a   href="WSVUtils.html#ExtractLastPath">ExtractLastPath</a></b>(Path: string): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a   href="WSVUtils.html#ExtractFileNameNoExt">ExtractFileNameNoExt</a></b>(Filename: string): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a   href="WSVUtils.html#EmptyAndRemoveDir">EmptyAndRemoveDir</a></b>(Path: string): Boolean;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a   href="WSVUtils.html#SortTreeProc">SortTreeProc</a></b>(Node1, Node2: TTreeNode; Data: Integer): Integer; stdcall;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a   href="WSVUtils.html#CreateNewFile">CreateNewFile</a></b>(Path: string; TemplateName: string; IsDirectory: Boolean): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a   href="WSVUtils.html#EncodeString">EncodeString</a></b>(Text: string): string;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a   href="WSVUtils.html#DecodeString">DecodeString</a></b>(Text: string): string;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code>function <b><a   href="WSVUtils.html#FindFiles">FindFiles</a></b>(Strings: TStrings; Dir: string; Mask: string; Attr: Integer; OnlyDirs: Boolean): Integer;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code>function <b><a   href="WSVUtils.html#CopyFileContent">CopyFileContent</a></b>(const SourceDir: string; const FileName: string; const DestDir: string): Boolean;</code></td>
</tr>
</table>
<a name="%40Types"></a><h3 class="summary">Types</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><b><a   href="WSVUtils.html#ENodeNotFoundError">ENodeNotFoundError</a></b> = Exception;</code></td>
</tr>
</table>
<a name="%40Constants"></a><h3 class="summary">Constants</h3>
<table class="summary wide_list">
<tr class="list">
<td class="itemcode"><code><b><a   href="WSVUtils.html#ImgIndex_Root">ImgIndex_Root</a></b> = 0;</code></td>
</tr>
<tr class="list2">
<td class="itemcode"><code><b><a   href="WSVUtils.html#ImgIndex_Folder">ImgIndex_Folder</a></b> = 1;</code></td>
</tr>
<tr class="list">
<td class="itemcode"><code><b><a   href="WSVUtils.html#ImgIndex_File">ImgIndex_File</a></b> = 2;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Functions and Procedures</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="ExtractLastPath"></a><code>function <b>ExtractLastPath</b>(Path: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Returns last directory in Path (Path has to point to a directory.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="ExtractFileNameNoExt"></a><code>function <b>ExtractFileNameNoExt</b>(Filename: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Returns file naem without its file extension</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="EmptyAndRemoveDir"></a><code>function <b>EmptyAndRemoveDir</b>(Path: string): Boolean;</code></td>
</tr>
<tr><td colspan="1">
<p>
Deletes all directory content and the directory itself</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="SortTreeProc"></a><code>function <b>SortTreeProc</b>(Node1, Node2: TTreeNode; Data: Integer): Integer; stdcall;</code></td>
</tr>
<tr><td colspan="1">
<p>
Used by the library tree view to sort its nodes</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CreateNewFile"></a><code>function <b>CreateNewFile</b>(Path: string; TemplateName: string; IsDirectory: Boolean): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Creates a new file with the name TemplateName. If this name is already taken by another file CreateNewFile() will search for an unused name by appending a number in braces to TemplateName.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="EncodeString"></a><code>function <b>EncodeString</b>(Text: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Encode text into a string without whitespace and control characters. </p>
<h6 class="description_section">See also</h6>
<dl class="see_also">
  <dt><a class="normal"  href="WSVUtils.html#DecodeString">DecodeString</a></dt>
  <dd>Decode a string that was encoded with EncodeString before.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="DecodeString"></a><code>function <b>DecodeString</b>(Text: string): string;</code></td>
</tr>
<tr><td colspan="1">
<p>
Decode a string that was encoded with EncodeString before. </p>
<h6 class="description_section">See also</h6>
<dl class="see_also">
  <dt><a class="normal"  href="WSVUtils.html#EncodeString">EncodeString</a></dt>
  <dd>Encode text into a string without whitespace and control characters.</dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="FindFiles"></a><code>function <b>FindFiles</b>(Strings: TStrings; Dir: string; Mask: string; Attr: Integer; OnlyDirs: Boolean): Integer;</code></td>
</tr>
<tr><td colspan="1">
<p>
Searches for files in the specified directory using a wildcard mask and file attribute search criteria. All found files are added to Strings.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="CopyFileContent"></a><code>function <b>CopyFileContent</b>(const SourceDir: string; const FileName: string; const DestDir: string): Boolean;</code></td>
</tr>
<tr><td colspan="1">
<p>
Copies the specified file or folder (with its content) from the given source directory to the specified destination directory.</p>
</td></tr>
</table>
<h3 class="detail">Types</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="ENodeNotFoundError"></a><code><b>ENodeNotFoundError</b> = Exception;</code></td>
</tr>
<tr><td colspan="1">
<p>
This exception is thrown, when a node in the workspace tree was needed, but could not be found.</p>
</td></tr>
</table>
<h3 class="detail">Constants</h3>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="ImgIndex_Root"></a><code><b>ImgIndex_Root</b> = 0;</code></td>
</tr>
<tr><td colspan="1">
<p>
Image index for file, folder and root icons:</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="ImgIndex_Folder"></a><code><b>ImgIndex_Folder</b> = 1;</code></td>
</tr>
<tr><td colspan="1">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="itemcode"><a name="ImgIndex_File"></a><code><b>ImgIndex_File</b> = 2;</code></td>
</tr>
<tr><td colspan="1">
&nbsp;</td></tr>
</table>
<hr noshade size="1"><span class="appinfo"><em>Generated by <a  target="_parent" href="http://pasdoc.sourceforge.net/">PasDoc 0.11.0</a> on 2009-05-27 22:26:19</em>
</span>
</body></html>
